<template>
  <div>
    <n-modal v-model:show="show">
      <n-card class="h-screen overflow-hidden">
        <div class="flex flex-col h-screen overflow-hidden ">
        <div class=" flex justify-end">
          <n-button secondary @click="doHide">
            <TextIcon tip="关闭" icon="mdi:close"></TextIcon>
          </n-button>
        </div>
          <n-divider></n-divider>
        <n-scrollbar>
          <VuePdfEmbed :source="source" />
        </n-scrollbar>
        </div>
      </n-card>
    </n-modal>
  </div>

</template>
<script setup lang="ts">
import { ref} from 'vue';
import VuePdfEmbed from 'vue-pdf-embed'
import TextIcon from "@/components/text/TextIcon.vue";


const source =ref('')


const show = ref(false)
const doHide = () => {
  show.value = false
}

const doShow = (id:any) => {
  source.value=id
  show.value = true

}

defineExpose({
  doShow
})
</script>

<style scoped>
</style>

